package com.alter.global.base.personel.service.impl;

import java.util.List;

import org.hibernate.criterion.Restrictions;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.alter.global.base.personel.dao.AfPhotoAlbumDao;
import com.alter.global.base.personel.service.PersonalbaseService;
import com.alter.model.AfPhotoAlbum;

@Service
@Transactional
public class PersonalbaseServiceImpl implements PersonalbaseService {

    @Autowired
    private AfPhotoAlbumDao albumDao;

    @Override
    public void savePhotoAlbum(AfPhotoAlbum album) {
	albumDao.save(album);
    }

    @Override
    public List<AfPhotoAlbum> searchPhotoAlbumByUserAid(String useraid) {
	return albumDao.find(Restrictions.eq("user.aid", useraid));
    }

}
